package com.onLineCar.dispatch.job;

import com.onLineCar.dispatch.service.DispatchVehicleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Slf4j
public class DispatchVehicleScheduled {

    @Resource
    private DispatchVehicleService dispatchVehicleService;
    @Scheduled(cron = "0/1 * * * * ? ")
    public void dispatchVehicleScheduled() {
//        log.info("--------------------定时任务开始执行--------------------");
        dispatchVehicleService.dispatchVehicleScheduled();
    }
}
